1. Field of the Invention
The present invention relates generally to vehicle control systems, and particularly to a vehicle control system control unit with re-programming capability and that prevents power to the controller from being cut off during re-programming.
2. Description of Related Art
A conventional control unit for controlling a control object such as a vehicle engine or transmission includes an associated control program held in a nonvolatile memory, such as flash memory or EEPROM, which can be re-programmed. The control unit is constructed so that the data in the re-programmable nonvolatile memory can be re-programmed even on an after-market basis.
Such a control unit also has a microcomputer operating on power from a vehicle battery. Normally, the microcomputer carries out control processing for controlling devices such as injectors and motors in accordance with a control program stored in the re-programmable nonvolatile memory. However, when it receives a re-program command from a re-programming device, the microcomputer overwrites the data in the re-programmable nonvolatile memory with new data transmitted from the re-programming device.
In a control unit such as the one disclosed in Japanese Unexamined Patent Publication No. Hei.7-311603, a unit identification code may be stored in the re-programmable nonvolatile memory and re-program processing carried out only when that identification code and an identification code transmitted from a re-programming device match, thereby preventing improper alteration of the data in the re-programmable nonvolatile memory.
In a control unit such as the one disclosed in Japanese Unexamined Patent Publication No. Hei.7-271634, a program for performing re-programming processing is stored in the re-programmable nonvolatile memory along with the control program. When program is to be executed, it is transferred to a volatile RAM and executed therefrom.
With a control unit to which the former of the above techniques has been applied, if for some reason it becomes necessary for the identification code of the unit to be changed on an after-market basis, this can be done because it is possible for the identification code of the unit to be re-programmed along with the control program.
Also, with a control unit to which the latter of the above techniques has been applied, if for some reason it becomes necessary to change the specifications of the re-program processing on an after-market basis, this can be done because it is possible for the program as well as the control program to be re-programmed.
However, with a control unit of the kind described above, if the power supply to the unit is cut off while the microcomputer is executing re-programming, the processing is interrupted, and the data in the nonvolatile memory is left in an incomplete state. When this happens, problems such as [1] and [2] below arise.
[1] In a control unit having an identification code in re-programmable nonvolatile memory, if re-programming is interrupted with all or a part of the identification code having been erased, even if power is supplied to the unit again and re-programming is re-attempted, because the identification code from the re-programming device and the identification code of the unit will not match, re-program processing cannot be executed again.
[2] In a control unit having a re-programming program in a re-programmable nonvolatile memory, if re-programming is interrupted with all or a part of the program having been erased, even if power is supplied to the unit again and re-programming is re-attempted, because there is no longer a normal program, re-programming cannot be executed again.
When it becomes impossible to execute re-programming processing again, the control unit can no longer be provided with a normal internal program and consequently becomes unusable.
A control unit of the above type is supplied with battery power only when the ignition switch of the vehicle is on. Therefore, there is a risk of the ignition switch being accidentally switched off by an operator as the data is being re-programmed in the nonvolatile memory, and thus a strong possibility of the re-programming in the control unit consequently being interrupted.